mod app;

use leptos::*;
use wasm_bindgen::prelude::*;

#[wasm_bindgen]
#[allow(dead_code)]
pub struct App(Disposer);

#[wasm_bindgen]
pub fn run(el: web_sys::HtmlElement) -> App {
    // console_error_panic_hook::set_once();
    App(create_effect(move |done| done.unwrap_or_else(|| mount_to(el.clone(), app::App))).into())
}

#[cfg(debug_assertions)]
#[wasm_bindgen(start)]
fn main() {
    mount_to_body(app::App);
}
